/* 
 * File:   Statistics.h
 * Author: James
 *
 * Created on November 7, 2010, 9:09 PM
 */

#ifndef STATISTICS_H
#define	STATISTICS_H

class Statistics {
public:
    Statistics();
    Statistics(int n);
    Statistics(const Statistics& orig);
    virtual ~Statistics();

    void addWait(int w){totalWait += w;};
    void addTurn(int t){totalTurn += t;};
    
    // g[3] = {p_id, start_proc_time, end_proc_time}
    void addGanttEntry(int g[3]);
    //
    int getAvgWait();
    int getAvgTurnaround();
    int** getGanttData();
private:
    int nProcs;

    int totalWait;
    int totalTurn;

    // gantt[x][0] = pid
    // gantt[x][1] = start
    // gantt[x][2] = end
    int* gantt[3];
    // index of current gantt entry
    int ganttI;
};

#endif	/* STATISTICS_H */

